package test.reflect;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * @author yachao.guo
 * @date 2019-06-04 11:07
 */
public class ReflectCase {

    private int count = 1 ;

    public int pCount = 2;

    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Proxy target = new Proxy();
        Method method = Proxy.class.getDeclaredMethod("run",Integer.TYPE);
        method.invoke(target,1);
    }

    private void get(){
        System.out.println("test javap");
    }

    static class Proxy {

        public void run(int i) {
            System.out.println("test reflect");
        }
    }
}
